package com.ssy.lingxi.platform.manage.controller.paas;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.platform.manage.api.model.dto.site.SitePAASDTO;
import com.ssy.lingxi.platform.manage.service.paas.ISitePAASService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author fhj
 * @version 2.0.0
 * @menu 站点 - （系统初始化）PAAS接口
 * @date 2020/9/17
 */
@Api(tags = "站点 - （系统初始化）PAAS接口")
@RestController
@RequestMapping("/manage/paas/sitePAAS")
public class SitePAASController {

    @Resource
    private ISitePAASService sitePAASService;

    @ApiOperation(value = "新增")
    @PostMapping("/add")
    public Wrapper<Void> add(@RequestBody SitePAASDTO dto) {
        return sitePAASService.add(dto);
    }

    @ApiOperation(value = "修改")
    @PostMapping("/update")
    public Wrapper<Void> update(@RequestBody SitePAASDTO dto) {
        return sitePAASService.update(dto);
    }

    @ApiOperation(value = "修改状态")
    @PostMapping("/update/state")
    public Wrapper<Void> updateState(@RequestBody SitePAASDTO dto) {
        return sitePAASService.updateState(dto);
    }

    @ApiOperation(value = "删除")
    @PostMapping("/delete")
    public Wrapper<Void> delete(@RequestBody SitePAASDTO dto) {
        return sitePAASService.delete(dto);
    }
}
